package com.bkgy.controller.shutdowndetails.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bkgy.controller.shutdowndetails.entity.*;
import com.bkgy.controller.shutdowndetails.entity.dto.TbDowntimeTcm2280Dto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShutdownMapper {
    /**
     * 查询一段区间的非计划停机
     * @param startDate
     * @param endDate
     * @return
     */
    public List<TbDowntimeTcm2280Dto> getTbDowntimeTcm2280List(String startDate, String endDate);

    /**
     * 查询时间后的总停机时间
     * @param startDate
     * @return
     */
    List<TbDowntimeTcm2280Dto> selectDownTimeMonth(String startDate);
    List<tbDowntimeCal1630> selectCal1630DownTimeMonth(String startDate);
    List<tbDowntimeCal2150> selectCal2150DownTimeMonth(String startDate);
    List<tbDowntimeCgl1870> selectcglDownTimeMonth(String startDate);

    /**
     * 1630连退停机记录-分页
     * @param query tbDowntimeCal1630
     * @return  List<tbDowntimeCal1630>
     */
    List<tbDowntimeCal1630> getTbDowntimeCal1630_page(Page<?> page, @Param("query") tbDowntimeCal1630 query);

    /**
     * 1630连退停机记录-总行
     * @param query tbDowntimeCal1630
     * @return 总行
     */
    Integer getTbDowntimeCal1630_pagecount(@Param("query") tbDowntimeCal1630 query);

    /**
     * 2150连退停机记录-分页
     * @param query tbDowntimeCal2150
     * @return  List<tbDowntimeCal2150>
     */
    List<tbDowntimeCal2150> getTbDowntimeCal2150_page(Page<?> page, @Param("query") tbDowntimeCal2150 query);

    /**
     * 2150连退停机记录-总行
     * @param query tbDowntimeCal2150
     * @return 总行
     */
    Integer getTbDowntimeCal2150_pagecount(@Param("query") tbDowntimeCal2150 query);

    /**
     * 1870镀锌停机记录-分页
     * @param query tbDowntimeCgl1870
     * @return  List<tbDowntimeCgl1870>
     */
    List<tbDowntimeCgl1870> getTbDowntimeCgl1870_page(Page<?> page, @Param("query") tbDowntimeCgl1870 query);

    /**
     * 1870镀锌停机记录-总行
     * @param query tbDowntimeCgl1870
     * @return 总行
     */
    Integer getTbDowntimeCgl1870_pagecount(@Param("query") tbDowntimeCgl1870 query);

    /**
     * 2280酸轧停机记录-分页
     * @param query tbDowntimeTcm2280
     * @return  List<tbDowntimeTcm2280>
     */
    List<TbDowntimeTcm2280Dto> getTbDowntimeTcm2280_page(Page<?> page, @Param("query") TbDowntimeTcm2280Dto query);

    /**
     * 2280酸轧停机记录-总行
     * @param query tbDowntimeTcm2280
     * @return 总行
     */
    Integer getTbDowntimeTcm2280_pagecount(@Param("query") TbDowntimeTcm2280Dto query);


    /**
     * 1630连退停机记录-客户录入功能
     * @param request tbDowntimeCal1630
     */
    Integer updateTbDowntimeCal1630(@Param("query") tbDowntimeCal1630 request);

    /**
     * 2150连退停机记录-客户录入功能
     * @param request tbDowntimeCal2150
     */
    Integer updateTbDowntimeCal2150(@Param("query") tbDowntimeCal2150 request);

    /**
     * 1870镀锌停机记录-客户录入功能
     * @param request tbDowntimeCgl1870
     */
    Integer updateTbDowntimeCgl1870(@Param("query") tbDowntimeCgl1870 request);

    /**
     * 2280酸轧停机记录-客户录入功能
     * @param request tbDowntimeTcm2280
     */
    Integer updateTbDowntimeTcm2280(@Param("query") TbDowntimeTcm2280Dto request);

    /**
     * 近12个月轧机停机-各类停机原因- TCM2280
     * @param query tbDowntime
     * @return  List<tbDowntime>
     */
    List<tbDowntime> tbDowntimeTcm2280_stops(@Param("query") tbDowntime query);

    /**
     * 近12个月轧机停机-各类停机原因- CGL1870
     * @param query tbDowntime
     * @return  List<tbDowntime>
     */
    List<tbDowntime> tbDowntimeCgl1870_stops(@Param("query") tbDowntime query);

    /**
     * 近12个月轧机停机-各类停机原因- CAL1630
     * @param query tbDowntime
     * @return  List<tbDowntime>
     */
    List<tbDowntime> tbDowntimeCal1630_stops(@Param("query") tbDowntime query);

    /**
     * 近12个月轧机停机-各类停机原因- CAL2150
     * @param query tbDowntime
     * @return  List<tbDowntime>
     */
    List<tbDowntime> tbDowntimeCal2150_stops(@Param("query") tbDowntime query);


    /**
     * 近12月各班组轧机停机次数-TCM2280
     * @param query tbDownCrew
     * @return  List<tbDownCrew>
     */
    List<tbDownCrew> tbDowntimeTcm2280_crew(@Param("query") tbDownCrew query);

    /**
     * 近12月各班组轧机停机次数-CGL1870
     * @param query tbDownCrew
     * @return  List<tbDownCrew>
     */
    List<tbDownCrew> tbDowntimeCgl1870_crew(@Param("query") tbDownCrew query);

    /**
     * 近12月各班组轧机停机次数-CAL1630
     * @param query tbDownCrew
     * @return  List<tbDownCrew>
     */
    List<tbDownCrew> tbDowntimeCal1630_crew(@Param("query") tbDownCrew query);

    /**
     * 近12月各班组轧机停机次数-CAL2150
     * @param query tbDownCrew
     * @return  List<tbDownCrew>
     */
    List<tbDownCrew> tbDowntimeCal2150_crew(@Param("query") tbDownCrew query);



    /**
     *  近12月标准/日历作业率-TCM2280
     * @param query tbDownRate
     * @return  List<tbDownRate>
     */
    List<tbDownRate> tbDowntimeTcm2280_rate(@Param("query") tbDownRate query);

    /**
     *  近12月标准/日历作业率-CGL1870
     * @param query tbDownRate
     * @return  List<tbDownRate>
     */
    List<tbDownRate> tbDowntimeCgl1870_rate(@Param("query") tbDownRate query);

    /**
     *  近12月标准/日历作业率-CAL1630
     * @param query tbDownRate
     * @return  List<tbDownRate>
     */
    List<tbDownRate> tbDowntimeCal1630_rate(@Param("query") tbDownRate query);

    /**
     *  近12月标准/日历作业率-CAL2150
     * @param query tbDownRate
     * @return  List<tbDownRate>
     */
    List<tbDownRate> tbDowntimeCal2150_rate(@Param("query") tbDownRate query);


    /**
     *  停机记录计划表-增
     * @param query tbDowntimePlan
     */
    Integer tbDowntimePlan_add(@Param("query") tbDowntimePlan query);

    /**
     *  停机记录计划表-删
     * @param query tbDowntimePlan
     */
    Integer tbDowntimePlan_del(@Param("query") tbDowntimePlan query);

    /**
     *  停机记录计划表-改
     * @param query tbDowntimePlan
     */
    Integer tbDowntimePlan_update(@Param("query") tbDowntimePlan query);

    /**
     *  停机记录计划表-查
     * @param query tbDowntimePlan
     */
    List<tbDowntimePlan>  tbDowntimePlan_query(Page<?> page, @Param("query") tbDowntimePlan query);

    /**
     *  停机记录计划表-查-总行数
     * @param query tbDowntimePlan
     */
    Integer tbDowntimePlan_query_pagecount(@Param("query") tbDowntimePlan query);
}
